<?php 


    session_start();

    if(isset($_SESSION['usuario'])&& ($_SESSION['tipo']=='usuario')){
        header('refresh:0; url=index.php');
    }
    else if(!isset($_SESSION['usuario'])){
        header('refresh:0; url=index.php');
    }

?>